// 函数防抖

export function debounce(callback, time = 400) {
	let timer;
	return (...args) => {
		clearTimeout(timer)
		timer = setTimeout(() => {
			callback(...args)
		}, time)
	}
}